<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>child</title>

    <style>

        /*     div:first-child{
                 color: red;
            }
             div:last-child{
                 color: green;
             }*/

        /*    div:nth-child(2){
                color: red;
            }*/

        /*div:nth-child(2n+1){
           color: red;
       }

        div:nth-child(2n){
            color: #00FF00;
        }*/

      /*  div:nth-child(odd) {
            color: gray;
        }

        div:nth-child(even) {
            color: #00FF00;
        }*/

        div:not(:last-child){
            color: red;
        }
    </style>
</head>
<body>
<div>
    1
</div>
<div>
    2
</div>
<div>
    3
</div>

</body>
</html>